<?xml version="1.0" encoding="utf-8"?>
<xs:schema id="ForumDataSet" targetNamespace="http://tempuri.org/ForumDataSet.xsd" xmlns:mstns="http://tempuri.org/ForumDataSet.xsd" xmlns="http://tempuri.org/ForumDataSet.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:msprop="urn:schemas-microsoft-com:xml-msprop" attributeFormDefault="qualified" elementFormDefault="qualified">
  <xs:annotation>
    <xs:appinfo source="urn:schemas-microsoft-com:xml-msdatasource">
      <DataSource DefaultConnectionIndex="0" FunctionsComponentName="QueriesTableAdapter" Modifier="AutoLayout, AnsiClass, Class, Public" SchemaSerializationMode="IncludeSchema" xmlns="urn:schemas-microsoft-com:xml-msdatasource">
        <Connections>
          <Connection AppSettingsObjectName="Settings" AppSettingsPropertyName="SocialNetworkConnectionString" ConnectionStringObject="" IsAppSettingsProperty="True" Modifier="Assembly" Name="SocialNetworkConnectionString (Settings)" ParameterPrefix="@" PropertyReference="ApplicationSettings.WLQuickApps.SocialNetwork.Data.Properties.Settings.GlobalReference.Default.SocialNetworkConnectionString" Provider="System.Data.SqlClient">
          </Connection>
        </Connections>
        <Tables>
          <TableAdapter BaseClass="System.ComponentModel.Component" DataAccessorModifier="AutoLayout, AnsiClass, Class, Public" DataAccessorName="ForumTableAdapter" GeneratorDataComponentClassName="ForumTableAdapter" Name="Forum" UserDataComponentName="ForumTableAdapter">
            <MainSource>
              <DbSource ConnectionRef="SocialNetworkConnectionString (Settings)" DbObjectName="SocialNetwork.dbo.Forum" DbObjectType="Table" FillMethodModifier="Public" FillMethodName="Fill" GenerateMethods="Both" GenerateShortCommands="True" GeneratorGetMethodName="GetData" GeneratorSourceName="Fill" GetMethodModifier="Public" GetMethodName="GetData" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="True" UserGetMethodName="GetData" UserSourceName="Fill">
                <DeleteCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="False">
                    <CommandText>DELETE FROM [dbo].[Forum] WHERE (([BaseItemID] = @Original_BaseItemID))</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_BaseItemID" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="BaseItemID" SourceColumnNullMapping="False" SourceVersion="Original">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </DeleteCommand>
                <InsertCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="False">
                    <CommandText>INSERT INTO [dbo].[Forum] ([BaseItemID]) VALUES (@BaseItemID);
SELECT BaseItemID FROM Forum WHERE (BaseItemID = @BaseItemID)</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@BaseItemID" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="BaseItemID" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </InsertCommand>
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="False">
                    <CommandText>SELECT BaseItemID FROM dbo.Forum</CommandText>
                    <Parameters>
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
                <UpdateCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="False">
                    <CommandText>UPDATE [dbo].[Forum] SET [BaseItemID] = @BaseItemID WHERE (([BaseItemID] = @Original_BaseItemID));
SELECT BaseItemID FROM Forum WHERE (BaseItemID = @BaseItemID)</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@BaseItemID" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="BaseItemID" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@Original_BaseItemID" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumn="BaseItemID" SourceColumnNullMapping="False" SourceVersion="Original">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </UpdateCommand>
              </DbSource>
            </MainSource>
            <Mappings>
              <Mapping SourceColumn="BaseItemID" DataSetColumn="BaseItemID" />
            </Mappings>
            <Sources>
              <DbSource ConnectionRef="SocialNetworkConnectionString (Settings)" DbObjectName="" DbObjectType="Unknown" GenerateShortCommands="True" GeneratorSourceName="CreateForum" Modifier="Public" Name="CreateForum" QueryType="NoData" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="True" UserGetMethodName="GetDataBy" UserSourceName="CreateForum">
                <InsertCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="True">
                    <CommandText>INSERT INTO Forum
                         (BaseItemID)
VALUES        (@baseItemID)</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="False" AutogeneratedName="baseItemID" ColumnName="BaseItemID" DataSourceName="SocialNetwork.dbo.Forum" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@baseItemID" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="BaseItemID" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </InsertCommand>
              </DbSource>
              <DbSource ConnectionRef="SocialNetworkConnectionString (Settings)" DbObjectName="" DbObjectType="Unknown" GenerateMethods="Get" GenerateShortCommands="True" GeneratorGetMethodName="GetForumsByTopic" GetMethodModifier="Public" GetMethodName="GetForumsByTopic" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="True" UserGetMethodName="GetForumsByTopic" UserSourceName="FillBy">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="True">
                    <CommandText>WITH PageTable AS
(
SELECT        Forum.BaseItemID

		, ROW_NUMBER() over (order by [Forum].BaseItemID) as RowID

FROM            Forum INNER JOIN
         BaseItem ON Forum.BaseItemID = BaseItem.BaseItemID
WHERE BaseItem.Description like @topic

)

select * from PageTable
where RowID between (@startRowIndex + 1) and (@startRowIndex + @maximumRows)</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName="" DbType="String" Direction="Input" ParameterName="@topic" Precision="0" ProviderType="NVarChar" Scale="0" Size="0" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@startRowIndex" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@maximumRows" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
              <DbSource ConnectionRef="SocialNetworkConnectionString (Settings)" DbObjectName="SocialNetwork.dbo.Forum" DbObjectType="Table" GenerateMethods="Get" GenerateShortCommands="True" GeneratorGetMethodName="GetForum" GetMethodModifier="Public" GetMethodName="GetForum" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="True" UserGetMethodName="GetForum" UserSourceName="GetForum1">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="True">
                    <CommandText>SELECT BaseItemID FROM dbo.Forum where BaseItemID = @baseItemID</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="False" AutogeneratedName="baseItemID" ColumnName="BaseItemID" DataSourceName="SocialNetwork.dbo.Forum" DataTypeServer="int" DbType="Int32" Direction="Input" ParameterName="@baseItemID" Precision="0" ProviderType="Int" Scale="0" Size="4" SourceColumn="BaseItemID" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
              <DbSource ConnectionRef="SocialNetworkConnectionString (Settings)" DbObjectName="" DbObjectType="Unknown" GenerateMethods="Get" GenerateShortCommands="True" GeneratorGetMethodName="GetForums" GetMethodModifier="Public" GetMethodName="GetForums" QueryType="Rowset" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="True" UserGetMethodName="GetForums" UserSourceName="GetForums1">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="True">
                    <CommandText>WITH PageTable AS
(
SELECT        [Forum].BaseItemID

		, ROW_NUMBER() over (order by [Forum].BaseItemID) as RowID

FROM            [Forum]
)

select * from PageTable
where RowID between (@startRowIndex + 1) and (@startRowIndex + @maximumRows)</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@startRowIndex" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                      <Parameter AllowDbNull="False" AutogeneratedName="" DataSourceName="" DbType="Int32" Direction="Input" ParameterName="@maximumRows" Precision="0" ProviderType="Int" Scale="0" Size="0" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
              <DbSource ConnectionRef="SocialNetworkConnectionString (Settings)" DbObjectType="Unknown" GenerateShortCommands="True" GeneratorSourceName="GetForumsByTopicCount" Modifier="Public" Name="GetForumsByTopicCount" QueryType="Scalar" ScalarCallRetval="System.Object, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="True" UserGetMethodName="GetDataBy2" UserSourceName="GetForumsByTopicCount">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="True">
                    <CommandText>SELECT COUNT(*)
FROM            Forum INNER JOIN
         BaseItem ON Forum.BaseItemID = BaseItem.BaseItemID
WHERE BaseItem.Description like @topic
</CommandText>
                    <Parameters>
                      <Parameter AllowDbNull="False" AutogeneratedName="topic" ColumnName="Description" DataSourceName="SocialNetwork.dbo.BaseItem" DataTypeServer="ntext" DbType="String" Direction="Input" ParameterName="@topic" Precision="0" ProviderType="NText" Scale="0" Size="1073741823" SourceColumn="Description" SourceColumnNullMapping="False" SourceVersion="Current">
                      </Parameter>
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
              <DbSource ConnectionRef="SocialNetworkConnectionString (Settings)" DbObjectType="Unknown" GenerateShortCommands="True" GeneratorSourceName="GetForumsCount" Modifier="Public" Name="GetForumsCount" QueryType="Scalar" ScalarCallRetval="System.Int32, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" UseOptimisticConcurrency="True" UserGetMethodName="GetDataBy1" UserSourceName="GetForumsCount">
                <SelectCommand>
                  <DbCommand CommandType="Text" ModifiedByUser="True">
                    <CommandText>SELECT COUNT(*) FROM Forum</CommandText>
                    <Parameters>
                    </Parameters>
                  </DbCommand>
                </SelectCommand>
              </DbSource>
            </Sources>
          </TableAdapter>
        </Tables>
        <Sources>
        </Sources>
      </DataSource>
    </xs:appinfo>
  </xs:annotation>
  <xs:element name="ForumDataSet" msdata:IsDataSet="true" msdata:UseCurrentLocale="true" msprop:Generator_UserDSName="ForumDataSet" msprop:Generator_DataSetName="ForumDataSet">
    <xs:complexType>
      <xs:choice minOccurs="0" maxOccurs="unbounded">
        <xs:element name="Forum" msprop:Generator_UserTableName="Forum" msprop:Generator_RowDeletedName="ForumRowDeleted" msprop:Generator_RowChangedName="ForumRowChanged" msprop:Generator_RowClassName="ForumRow" msprop:Generator_RowChangingName="ForumRowChanging" msprop:Generator_RowEvArgName="ForumRowChangeEvent" msprop:Generator_RowEvHandlerName="ForumRowChangeEventHandler" msprop:Generator_TableClassName="ForumDataTable" msprop:Generator_TableVarName="tableForum" msprop:Generator_RowDeletingName="ForumRowDeleting" msprop:Generator_TablePropName="Forum">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="BaseItemID" msprop:Generator_UserColumnName="BaseItemID" msprop:Generator_ColumnPropNameInRow="BaseItemID" msprop:Generator_ColumnVarNameInTable="columnBaseItemID" msprop:Generator_ColumnPropNameInTable="BaseItemIDColumn" type="xs:int" />
            </xs:sequence>
          </xs:complexType>
        </xs:element>
      </xs:choice>
    </xs:complexType>
    <xs:unique name="Constraint1" msdata:PrimaryKey="true">
      <xs:selector xpath=".//mstns:Forum" />
      <xs:field xpath="mstns:BaseItemID" />
    </xs:unique>
  </xs:element>
</xs:schema>